package com.xaomn.response;

import lombok.Data;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.List;

/**
 * @author xaoMn
 * @title: BaseResponse
 * @projectName yjs
 * @description: TODO
 * @date 日期：2022/1/28 时间：19:13
 */
@Data
public class BaseResponse<T> implements Serializable {
    private int code;
    private String msg;
    private T data;

    public BaseResponse(Status status) {
        this.code = status.code;
        this.msg = status.message;
    }

    public BaseResponse(int code, String msg, T data) {
        this.setCode(code);
        this.setMsg(msg);
        this.setData(data);
    }
}
